Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@uniswap/sdk-core
Advanced tools
@uniswap/sdk-core is a JavaScript library that provides core utilities and functions for interacting with the Uniswap protocol. It is designed to help developers build applications that integrate with Uniswap by providing tools for handling tokens, pairs, and transactions.
Token Management
This feature allows you to create and manage token instances. The code sample demonstrates how to create a new token instance for DAI on the Ethereum mainnet.
const { Token } = require('@uniswap/sdk-core');
const token = new Token(1, '0x6B175474E89094C44Da98b954EedeAC495271d0F', 18, 'DAI', 'Dai Stablecoin');
Currency Amounts
This feature allows you to handle currency amounts in a precise manner. The code sample shows how to create a currency amount for 1 DAI.
const { Token, CurrencyAmount } = require('@uniswap/sdk-core');
const token = new Token(1, '0x6B175474E89094C44Da98b954EedeAC495271d0F', 18, 'DAI', 'Dai Stablecoin');
const amount = CurrencyAmount.fromRawAmount(token, '1000000000000000000');
Fractional Math
This feature provides utilities for fractional math operations. The code sample demonstrates how to perform addition with fractions.
const { Fraction } = require('@uniswap/sdk-core');
const fraction = new Fraction(1, 2);
const result = fraction.add(new Fraction(3, 4));
Ethers.js is a library for interacting with the Ethereum blockchain and its ecosystem. It provides utilities for managing wallets, interacting with smart contracts, and handling Ethereum transactions. While it offers broader blockchain functionalities, @uniswap/sdk-core is more focused on Uniswap-specific operations.
Web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node. It provides functionalities for sending transactions, interacting with smart contracts, and more. Compared to @uniswap/sdk-core, Web3.js is more general-purpose and not specifically tailored to Uniswap.
Uniswap V3 SDK is a library specifically designed for interacting with Uniswap V3. It provides more advanced features for handling Uniswap V3's concentrated liquidity pools. While @uniswap/sdk-core provides core utilities, the V3 SDK offers more specialized tools for the latest version of Uniswap.
FAQs
⚒️ An SDK for building applications on top of Uniswap V3
The npm package @uniswap/sdk-core receives a total of 98,564 weekly downloads. As such, @uniswap/sdk-core popularity was classified as popular.
We found that @uniswap/sdk-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.